<div id="column-right">
    <?php echo $this->element('sidebar'); ?>
</div>

<div id="content">
    <div class="tab" style="margin-bottom:10px;"> <h1>Shopping Cart</h1></div>
    <form action="<?php echo DOMAIN; ?>product/update_shopping_cart" method="post" enctype="multipart/form-data">
        <div class="cart-info">
            <table>
                <thead>
                <tr>

                    <td class="name">Product Name</td>
                    <td class="model">Model</td>
                    <td class="price">Unit Price</td>
                    <td class="quantity">Quantity</td>
                    <td class="total">Total</td>
                </tr>
                </thead>
                <tbody>
                <?php
                $tongtien = 0;
                if(!empty($shopping_cart)){ foreach($shopping_cart as $key => $value){ ?>
                <tr>

                    <td class="name">
                        <?php echo $value['Product']['name']; ?>
                        <!--<a href="http://3darcshop.com/3dmodel-3darcexterior-vol-01.html">3DARCEXTERIOR VOL 01</a>-->
                    </td>
                    <td class="model"><?php echo $value['Product']['code'] ?></td>
                    <td class="price"><?php echo '€'.number_format($value['Product']['price']); ?></td>
                    <td class="quantity">
                        <input style="width: 30px;" type="text" name="so_luong[<?php echo $value['Product']['id']; ?>]" value="<?php echo $value['so_luong']; ?>" maxlength="2" />
                        &nbsp;
                        <input type="image" src="images/update.png">
                        &nbsp;
                        <a style="font-weight: bold;" href="<?php echo DOMAIN.'product/delete_shopping_cart/'.$value['Product']['id']; ?>">
                            <img src="images/remove.png">
                        </a>
                    </td>

                    <td class="total">
                        <?php $thanhtien = $value['Product']['price'] * $value['so_luong'];
                        echo '€'.number_format($thanhtien);
                        $tongtien += $thanhtien;
                        ?>
                    </td>
                </tr>

                <?php } } ?>

                </tbody>
            </table>
        </div>

        <div class="cart-total">
            <table id="total">
                <tbody><tr>
                    <td class="right"><b>Sub-Total:</b></td>
                    <td class="right"><?php echo '€'.number_format($tongtien); ?></td>
                </tr>
                <tr>
                    <td class="right"><b>Total:</b></td>
                    <td class="right"><?php echo '€'.number_format($tongtien); ?></td>
                </tr>
                </tbody></table>
        </div>

        <div class="cart-info">
            <table>
                <tr>
                    <td>
                        <p style="font-weight: bold">Please select a Payment Method!</p>
                        <div>
                            <input type="radio" name="rdoPaymentMethod" id="rdoPaymentMethod" checked="checked">
                            <label for="rdoPaymentMethod">PayPal / Credit Card</label>
                        </div>
                    </td>
                </tr>
            </table>
        </div>

        <div class="buttons">

            <div class="right">
                <?php echo $this->Html->link(
                    'Checkout',
                    array('controller' => 'Product', 'action' => 'checkout'), array('class' => 'button')
                ); ?>
            </div>
        </div>
    </form>
</div>

